package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;

import com.sa.ibiz.demo.demo.domain.MsgTemplate;

/**
 * 实体[WFWorkflow] 数据对象
 */
@TableName(value = "T_SRFWFWORKFLOW",resultMap = "WFWorkflowResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WFWorkflow extends EntityBase implements Serializable{

    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private MsgTemplate remindmsgtempl;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String createman;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    @TableLogic(value= "1",delval="0")//设定逻辑有效属性
    @TableField(fill = FieldFill.INSERT)
    private Integer enable;
    private String memo;
    private String remindmsgtemplid;
    @TableField(exist = false)//逻辑属性
    private String remindmsgtemplname;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String updateman;
    private String userdatacmd;
    private String userdatacmd10;
    private String userdatacmd2;
    private String userdatacmd3;
    private String userdatacmd4;
    private String userdatacmd5;
    private String userdatacmd6;
    private String userdatacmd7;
    private String userdatacmd8;
    private String userdatacmd9;
    private String userdataname;
    private String wfhelper;
    private String wfhelperparam;
    private String wflanrestag;
    private String wflogicname;
    private String wfmodel;
    @Dict(dictName = "WorkflowMob_WFConfigStateCodeList")
    private Integer wfstate;
    @Dict(dictName = "WorkflowMob_WFConfigTypeCodeList")
    private String wftype;
    private Integer wfversion;
    @TableId(value= "wfworkflowid",type=IdType.UUID)//指定主键生成策略
    private String wfworkflowid;
    private String wfworkflowname;
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[逻辑有效标志]
     *  @param enable
     */
    public void setEnable(Integer enable){
        this.enable = enable;
        this.set("enabledirtyflag",true);
    }
    /**
     *  获取属性值[逻辑有效标志]
     */
    public Integer getEnable(){
        if(StringUtils.isEmpty(enable))
        {
            this.enable = 1;//设置逻辑有效值
            this.set("enabledirtyflag",true);
        }
        return this.enable;
    }
    /**
     *  重置属性值[逻辑有效标志]
     */
    public void resetEnable(){
        this.set("enabledirtyflag",false);
        this.enable = null;
    }
    /**
     *  设置属性值[工作流说明]
     *  @param memo
     */
    public void setMemo(String memo){
        if(StringUtils.isEmpty(memo))
            memo=null;
        this.memo = memo;
        this.set("memodirtyflag",true);
    }
    /**
     *  获取属性值[工作流说明]
     */
    public String getMemo(){
        return this.memo;
    }
    /**
     *  重置属性值[工作流说明]
     */
    public void resetMemo(){
        this.set("memodirtyflag",false);
        this.memo = null;
    }
    /**
     *  设置属性值[催办消息模板]
     *  @param remindmsgtemplid
     */
    public void setRemindmsgtemplid(String remindmsgtemplid){
        if(StringUtils.isEmpty(remindmsgtemplid))
            remindmsgtemplid=null;
        this.remindmsgtemplid = remindmsgtemplid;
        this.set("remindmsgtempliddirtyflag",true);
    }
    /**
     *  获取属性值[催办消息模板]
     */
    public String getRemindmsgtemplid(){
        return this.remindmsgtemplid;
    }
    /**
     *  重置属性值[催办消息模板]
     */
    public void resetRemindmsgtemplid(){
        this.set("remindmsgtempliddirtyflag",false);
        this.remindmsgtemplid = null;
    }
    /**
     *  设置属性值[催办消息模板]
     *  @param remindmsgtemplname
     */
    public void setRemindmsgtemplname(String remindmsgtemplname){
        if(StringUtils.isEmpty(remindmsgtemplname))
            remindmsgtemplname=null;
        this.remindmsgtemplname = remindmsgtemplname;
        this.set("remindmsgtemplnamedirtyflag",true);
    }
    /**
     *  获取属性值[催办消息模板]
     */
    public String getRemindmsgtemplname(){
        return this.remindmsgtemplname;
    }
    /**
     *  重置属性值[催办消息模板]
     */
    public void resetRemindmsgtemplname(){
        this.set("remindmsgtemplnamedirtyflag",false);
        this.remindmsgtemplname = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     *  设置属性值[USERDATACMD]
     *  @param userdatacmd
     */
    public void setUserdatacmd(String userdatacmd){
        if(StringUtils.isEmpty(userdatacmd))
            userdatacmd=null;
        this.userdatacmd = userdatacmd;
        this.set("userdatacmddirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD]
     */
    public String getUserdatacmd(){
        return this.userdatacmd;
    }
    /**
     *  重置属性值[USERDATACMD]
     */
    public void resetUserdatacmd(){
        this.set("userdatacmddirtyflag",false);
        this.userdatacmd = null;
    }
    /**
     *  设置属性值[USERDATACMD10]
     *  @param userdatacmd10
     */
    public void setUserdatacmd10(String userdatacmd10){
        if(StringUtils.isEmpty(userdatacmd10))
            userdatacmd10=null;
        this.userdatacmd10 = userdatacmd10;
        this.set("userdatacmd10dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD10]
     */
    public String getUserdatacmd10(){
        return this.userdatacmd10;
    }
    /**
     *  重置属性值[USERDATACMD10]
     */
    public void resetUserdatacmd10(){
        this.set("userdatacmd10dirtyflag",false);
        this.userdatacmd10 = null;
    }
    /**
     *  设置属性值[USERDATACMD2]
     *  @param userdatacmd2
     */
    public void setUserdatacmd2(String userdatacmd2){
        if(StringUtils.isEmpty(userdatacmd2))
            userdatacmd2=null;
        this.userdatacmd2 = userdatacmd2;
        this.set("userdatacmd2dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD2]
     */
    public String getUserdatacmd2(){
        return this.userdatacmd2;
    }
    /**
     *  重置属性值[USERDATACMD2]
     */
    public void resetUserdatacmd2(){
        this.set("userdatacmd2dirtyflag",false);
        this.userdatacmd2 = null;
    }
    /**
     *  设置属性值[USERDATACMD3]
     *  @param userdatacmd3
     */
    public void setUserdatacmd3(String userdatacmd3){
        if(StringUtils.isEmpty(userdatacmd3))
            userdatacmd3=null;
        this.userdatacmd3 = userdatacmd3;
        this.set("userdatacmd3dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD3]
     */
    public String getUserdatacmd3(){
        return this.userdatacmd3;
    }
    /**
     *  重置属性值[USERDATACMD3]
     */
    public void resetUserdatacmd3(){
        this.set("userdatacmd3dirtyflag",false);
        this.userdatacmd3 = null;
    }
    /**
     *  设置属性值[USERDATACMD4]
     *  @param userdatacmd4
     */
    public void setUserdatacmd4(String userdatacmd4){
        if(StringUtils.isEmpty(userdatacmd4))
            userdatacmd4=null;
        this.userdatacmd4 = userdatacmd4;
        this.set("userdatacmd4dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD4]
     */
    public String getUserdatacmd4(){
        return this.userdatacmd4;
    }
    /**
     *  重置属性值[USERDATACMD4]
     */
    public void resetUserdatacmd4(){
        this.set("userdatacmd4dirtyflag",false);
        this.userdatacmd4 = null;
    }
    /**
     *  设置属性值[USERDATACMD5]
     *  @param userdatacmd5
     */
    public void setUserdatacmd5(String userdatacmd5){
        if(StringUtils.isEmpty(userdatacmd5))
            userdatacmd5=null;
        this.userdatacmd5 = userdatacmd5;
        this.set("userdatacmd5dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD5]
     */
    public String getUserdatacmd5(){
        return this.userdatacmd5;
    }
    /**
     *  重置属性值[USERDATACMD5]
     */
    public void resetUserdatacmd5(){
        this.set("userdatacmd5dirtyflag",false);
        this.userdatacmd5 = null;
    }
    /**
     *  设置属性值[USERDATACMD6]
     *  @param userdatacmd6
     */
    public void setUserdatacmd6(String userdatacmd6){
        if(StringUtils.isEmpty(userdatacmd6))
            userdatacmd6=null;
        this.userdatacmd6 = userdatacmd6;
        this.set("userdatacmd6dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD6]
     */
    public String getUserdatacmd6(){
        return this.userdatacmd6;
    }
    /**
     *  重置属性值[USERDATACMD6]
     */
    public void resetUserdatacmd6(){
        this.set("userdatacmd6dirtyflag",false);
        this.userdatacmd6 = null;
    }
    /**
     *  设置属性值[USERDATACMD7]
     *  @param userdatacmd7
     */
    public void setUserdatacmd7(String userdatacmd7){
        if(StringUtils.isEmpty(userdatacmd7))
            userdatacmd7=null;
        this.userdatacmd7 = userdatacmd7;
        this.set("userdatacmd7dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD7]
     */
    public String getUserdatacmd7(){
        return this.userdatacmd7;
    }
    /**
     *  重置属性值[USERDATACMD7]
     */
    public void resetUserdatacmd7(){
        this.set("userdatacmd7dirtyflag",false);
        this.userdatacmd7 = null;
    }
    /**
     *  设置属性值[USERDATACMD8]
     *  @param userdatacmd8
     */
    public void setUserdatacmd8(String userdatacmd8){
        if(StringUtils.isEmpty(userdatacmd8))
            userdatacmd8=null;
        this.userdatacmd8 = userdatacmd8;
        this.set("userdatacmd8dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD8]
     */
    public String getUserdatacmd8(){
        return this.userdatacmd8;
    }
    /**
     *  重置属性值[USERDATACMD8]
     */
    public void resetUserdatacmd8(){
        this.set("userdatacmd8dirtyflag",false);
        this.userdatacmd8 = null;
    }
    /**
     *  设置属性值[USERDATACMD9]
     *  @param userdatacmd9
     */
    public void setUserdatacmd9(String userdatacmd9){
        if(StringUtils.isEmpty(userdatacmd9))
            userdatacmd9=null;
        this.userdatacmd9 = userdatacmd9;
        this.set("userdatacmd9dirtyflag",true);
    }
    /**
     *  获取属性值[USERDATACMD9]
     */
    public String getUserdatacmd9(){
        return this.userdatacmd9;
    }
    /**
     *  重置属性值[USERDATACMD9]
     */
    public void resetUserdatacmd9(){
        this.set("userdatacmd9dirtyflag",false);
        this.userdatacmd9 = null;
    }
    /**
     *  设置属性值[USERDATANAME]
     *  @param userdataname
     */
    public void setUserdataname(String userdataname){
        if(StringUtils.isEmpty(userdataname))
            userdataname=null;
        this.userdataname = userdataname;
        this.set("userdatanamedirtyflag",true);
    }
    /**
     *  获取属性值[USERDATANAME]
     */
    public String getUserdataname(){
        return this.userdataname;
    }
    /**
     *  重置属性值[USERDATANAME]
     */
    public void resetUserdataname(){
        this.set("userdatanamedirtyflag",false);
        this.userdataname = null;
    }
    /**
     *  设置属性值[流程辅助对象]
     *  @param wfhelper
     */
    public void setWfhelper(String wfhelper){
        if(StringUtils.isEmpty(wfhelper))
            wfhelper=null;
        this.wfhelper = wfhelper;
        this.set("wfhelperdirtyflag",true);
    }
    /**
     *  获取属性值[流程辅助对象]
     */
    public String getWfhelper(){
        return this.wfhelper;
    }
    /**
     *  重置属性值[流程辅助对象]
     */
    public void resetWfhelper(){
        this.set("wfhelperdirtyflag",false);
        this.wfhelper = null;
    }
    /**
     *  设置属性值[辅助对象参数]
     *  @param wfhelperparam
     */
    public void setWfhelperparam(String wfhelperparam){
        if(StringUtils.isEmpty(wfhelperparam))
            wfhelperparam=null;
        this.wfhelperparam = wfhelperparam;
        this.set("wfhelperparamdirtyflag",true);
    }
    /**
     *  获取属性值[辅助对象参数]
     */
    public String getWfhelperparam(){
        return this.wfhelperparam;
    }
    /**
     *  重置属性值[辅助对象参数]
     */
    public void resetWfhelperparam(){
        this.set("wfhelperparamdirtyflag",false);
        this.wfhelperparam = null;
    }
    /**
     *  设置属性值[流程语言资源]
     *  @param wflanrestag
     */
    public void setWflanrestag(String wflanrestag){
        if(StringUtils.isEmpty(wflanrestag))
            wflanrestag=null;
        this.wflanrestag = wflanrestag;
        this.set("wflanrestagdirtyflag",true);
    }
    /**
     *  获取属性值[流程语言资源]
     */
    public String getWflanrestag(){
        return this.wflanrestag;
    }
    /**
     *  重置属性值[流程语言资源]
     */
    public void resetWflanrestag(){
        this.set("wflanrestagdirtyflag",false);
        this.wflanrestag = null;
    }
    /**
     *  设置属性值[逻辑名称]
     *  @param wflogicname
     */
    public void setWflogicname(String wflogicname){
        if(StringUtils.isEmpty(wflogicname))
            wflogicname=null;
        this.wflogicname = wflogicname;
        this.set("wflogicnamedirtyflag",true);
    }
    /**
     *  获取属性值[逻辑名称]
     */
    public String getWflogicname(){
        return this.wflogicname;
    }
    /**
     *  重置属性值[逻辑名称]
     */
    public void resetWflogicname(){
        this.set("wflogicnamedirtyflag",false);
        this.wflogicname = null;
    }
    /**
     *  设置属性值[配置]
     *  @param wfmodel
     */
    public void setWfmodel(String wfmodel){
        if(StringUtils.isEmpty(wfmodel))
            wfmodel=null;
        this.wfmodel = wfmodel;
        this.set("wfmodeldirtyflag",true);
    }
    /**
     *  获取属性值[配置]
     */
    public String getWfmodel(){
        return this.wfmodel;
    }
    /**
     *  重置属性值[配置]
     */
    public void resetWfmodel(){
        this.set("wfmodeldirtyflag",false);
        this.wfmodel = null;
    }
    /**
     *  设置属性值[工作流状态]
     *  @param wfstate
     */
    public void setWfstate(Integer wfstate){
        this.wfstate = wfstate;
        this.set("wfstatedirtyflag",true);
    }
    /**
     *  获取属性值[工作流状态]
     */
    public Integer getWfstate(){
        return this.wfstate;
    }
    /**
     *  重置属性值[工作流状态]
     */
    public void resetWfstate(){
        this.set("wfstatedirtyflag",false);
        this.wfstate = null;
    }
    /**
     *  设置属性值[流程类型]
     *  @param wftype
     */
    public void setWftype(String wftype){
        if(StringUtils.isEmpty(wftype))
            wftype=null;
        this.wftype = wftype;
        this.set("wftypedirtyflag",true);
    }
    /**
     *  获取属性值[流程类型]
     */
    public String getWftype(){
        return this.wftype;
    }
    /**
     *  重置属性值[流程类型]
     */
    public void resetWftype(){
        this.set("wftypedirtyflag",false);
        this.wftype = null;
    }
    /**
     *  设置属性值[版本]
     *  @param wfversion
     */
    public void setWfversion(Integer wfversion){
        this.wfversion = wfversion;
        this.set("wfversiondirtyflag",true);
    }
    /**
     *  获取属性值[版本]
     */
    public Integer getWfversion(){
        return this.wfversion;
    }
    /**
     *  重置属性值[版本]
     */
    public void resetWfversion(){
        this.set("wfversiondirtyflag",false);
        this.wfversion = null;
    }
    /**
     *  设置属性值[工作流配置标识]
     *  @param wfworkflowid
     */
    public void setWfworkflowid(String wfworkflowid){
        if(StringUtils.isEmpty(wfworkflowid))
            wfworkflowid=null;
        this.wfworkflowid = wfworkflowid;
        this.set("wfworkflowiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流配置标识]
     */
    public String getWfworkflowid(){
        return this.wfworkflowid;
    }
    /**
     *  重置属性值[工作流配置标识]
     */
    public void resetWfworkflowid(){
        this.set("wfworkflowiddirtyflag",false);
        this.wfworkflowid = null;
    }
    /**
     *  设置属性值[工作流配置名称]
     *  @param wfworkflowname
     */
    public void setWfworkflowname(String wfworkflowname){
        if(StringUtils.isEmpty(wfworkflowname))
            wfworkflowname=null;
        this.wfworkflowname = wfworkflowname;
        this.set("wfworkflownamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流配置名称]
     */
    public String getWfworkflowname(){
        return this.wfworkflowname;
    }
    /**
     *  重置属性值[工作流配置名称]
     */
    public void resetWfworkflowname(){
        this.set("wfworkflownamedirtyflag",false);
        this.wfworkflowname = null;
    }
     /**
     *  获取主实体关联数据[MsgTemplate]
     */
    public MsgTemplate getRemindmsgtempl() {
        return remindmsgtempl;
    }
    /**
     *  设置主实体关联数据[MsgTemplate]
     */
    public void setRemindmsgtempl(MsgTemplate remindmsgtempl) {
        this.remindmsgtempl = remindmsgtempl;
    }

    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetCreatedate();
        resetCreateman();
        resetEnable();
        resetMemo();
        resetRemindmsgtemplid();
        resetRemindmsgtemplname();
        resetUpdatedate();
        resetUpdateman();
        resetUserdatacmd();
        resetUserdatacmd10();
        resetUserdatacmd2();
        resetUserdatacmd3();
        resetUserdatacmd4();
        resetUserdatacmd5();
        resetUserdatacmd6();
        resetUserdatacmd7();
        resetUserdatacmd8();
        resetUserdatacmd9();
        resetUserdataname();
        resetWfhelper();
        resetWfhelperparam();
        resetWflanrestag();
        resetWflogicname();
        resetWfmodel();
        resetWfstate();
        resetWftype();
        resetWfversion();
        resetWfworkflowid();
        resetWfworkflowname();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
	    //随机生成主键
         return  IdWorker.get32UUID();

    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public WFWorkflow copyTo(WFWorkflow targetEntity)
	{
		BeanCopier copier=BeanCopier.create(WFWorkflow.class, WFWorkflow.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetWfworkflowid();
		return targetEntity;
	}
}